{include file="public/head"/}
<link rel="stylesheet" href="__ADMIN__/ace/css/chosen.css" />
<style>
  .row .cf {
    margin-bottom: 10px;
  }
  .chosen-container-multi .chosen-choices,.chosen-container-single .chosen-single{
    width:300px;
    height:32px !important;
    border-color:#d5d5d5;
  }
  .chosen-container-multi .chosen-choices li.search-field,.chosen-container-single .chosen-single span{
    height:32px;
    line-height:32px;
  }
  .chosen-single div b:before{
    top:3px;
  }

</style>

<div class="main-container" id="main-container">
  <script type="text/javascript">
    try {
      ace.settings.check('main-container', 'fixed')
    } catch (e) {
    }
  </script>

  <div class="main-container-inner">
    <a class="menu-toggler" id="menu-toggler" href="#">
      <span class="menu-text"></span>
    </a>

    {include file="public/nav"/}

    {include file="public/menu"/}

    <div class="main-content">
      {include file="public/breadcrumb"/}

      <div class="page-content">
        <div class="row">
          <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->
            <form class="form-horizontal" id="fmWork" method="post">
              <input type="hidden" name="id" value="{$work.id}">
              <div class="form-group">
                <label class="col-sm-1 control-label no-padding-right"> 订单号 </label>
                <div class="col-sm-9">
                  <input type="text" name="num" placeholder="订单号" class="col-xs-10 col-sm-5" value="{$work.num}">
                  <span class="help-inline col-xs-12 col-sm-7">
                      <span class="middle">
                        订单号会在保存时自动生成<literal></literal>
                      </span>
                  </span>
                </div>
              </div>
              <div class="space-4"></div>
              <div class="form-group">
                <label class="col-sm-1 control-label no-padding-right"> 车牌号 </label>
                <div class="col-sm-9">
                  <select class="col-xs-10 col-sm-5 chosen-select" data-placeholder="选择车牌">
                  <option value="">&nbsp;</option>
                  <option value="AL">Alabama</option>
                  <option value="AK">Alaska</option>
                  <option value="AZ">Arizona</option>
                  <option value="AR">Arkansas</option>
                  <option value="CA">California</option>
                  <option value="CO">Colorado</option>
                  <option value="CT">Connecticut</option>
                  <option value="DE">Delaware</option>
                  <option value="FL">Florida</option>
                  <option value="GA">Georgia</option>
                  <option value="HI">Hawaii</option>
                  <option value="ID">Idaho</option>
                  <option value="IL">Illinois</option>
                  <option value="IN">Indiana</option>
                  <option value="IA">Iowa</option>
                  <option value="KS">Kansas</option>
                  <option value="KY">Kentucky</option>
                  <option value="LA">Louisiana</option>
                  <option value="ME">Maine</option>
                  <option value="MD">Maryland</option>
                  <option value="MA">Massachusetts</option>
                  <option value="MI">Michigan</option>
                  <option value="MN">Minnesota</option>
                  <option value="MS">Mississippi</option>
                  <option value="MO">Missouri</option>
                  <option value="MT">Montana</option>
                  <option value="NE">Nebraska</option>
                  <option value="NV">Nevada</option>
                  <option value="NH">New Hampshire</option>
                  <option value="NJ">New Jersey</option>
                  <option value="NM">New Mexico</option>
                  <option value="NY">New York</option>
                  <option value="NC">North Carolina</option>
                  <option value="ND">North Dakota</option>
                  <option value="OH">Ohio</option>
                  <option value="OK">Oklahoma</option>
                  <option value="OR">Oregon</option>
                  <option value="PA">Pennsylvania</option>
                  <option value="RI">Rhode Island</option>
                  <option value="SC">South Carolina</option>
                  <option value="SD">South Dakota</option>
                  <option value="TN">Tennessee</option>
                  <option value="TX">Texas</option>
                  <option value="UT">Utah</option>
                  <option value="VT">Vermont</option>
                  <option value="VA">Virginia</option>
                  <option value="WA">Washington</option>
                  <option value="WV">West Virginia</option>
                  <option value="WI">Wisconsin</option>
                  <option value="WY">Wyoming</option>
                  </select>
                  <span class="help-inline col-xs-12 col-sm-7">
                    <span class="middle"></span>
                  </span>
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-1 control-label no-padding-right"> 客户 </label>
                <div class="col-sm-9">
                  <select class="col-xs-10 col-sm-5 chosen-select" data-placeholder="选择客户">
                    <option value="">&nbsp;</option>
                    <option value="AL">Alabama</option>
                    <option value="AK">Alaska</option>
                    <option value="AZ">Arizona</option>
                    <option value="AR">Arkansas</option>
                    <option value="CA">California</option>
                    <option value="CO">Colorado</option>
                    <option value="CT">Connecticut</option>
                    <option value="DE">Delaware</option>
                    <option value="FL">Florida</option>
                    <option value="GA">Georgia</option>
                    <option value="HI">Hawaii</option>
                    <option value="ID">Idaho</option>
                    <option value="IL">Illinois</option>
                    <option value="IN">Indiana</option>
                    <option value="IA">Iowa</option>
                    <option value="KS">Kansas</option>
                    <option value="KY">Kentucky</option>
                    <option value="LA">Louisiana</option>
                    <option value="ME">Maine</option>
                    <option value="MD">Maryland</option>
                    <option value="MA">Massachusetts</option>
                    <option value="MI">Michigan</option>
                    <option value="MN">Minnesota</option>
                    <option value="MS">Mississippi</option>
                    <option value="MO">Missouri</option>
                    <option value="MT">Montana</option>
                    <option value="NE">Nebraska</option>
                    <option value="NV">Nevada</option>
                    <option value="NH">New Hampshire</option>
                    <option value="NJ">New Jersey</option>
                    <option value="NM">New Mexico</option>
                    <option value="NY">New York</option>
                    <option value="NC">North Carolina</option>
                    <option value="ND">North Dakota</option>
                    <option value="OH">Ohio</option>
                    <option value="OK">Oklahoma</option>
                    <option value="OR">Oregon</option>
                    <option value="PA">Pennsylvania</option>
                    <option value="RI">Rhode Island</option>
                    <option value="SC">South Carolina</option>
                    <option value="SD">South Dakota</option>
                    <option value="TN">Tennessee</option>
                    <option value="TX">Texas</option>
                    <option value="UT">Utah</option>
                    <option value="VT">Vermont</option>
                    <option value="VA">Virginia</option>
                    <option value="WA">Washington</option>
                    <option value="WV">West Virginia</option>
                    <option value="WI">Wisconsin</option>
                    <option value="WY">Wyoming</option>
                  </select>

                  <span class="help-inline col-xs-12 col-sm-7">
                    <span class="middle"></span>
                  </span>
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-1 control-label no-padding-right"> 接待员 </label>
                <div class="col-sm-9">
                  <select multiple class="col-xs-10 col-sm-5 chosen-select tag-input-style" data-placeholder="选择接待员">
                    <option value="">&nbsp;</option>
                    <option value="AL">Alabama</option>
                    <option value="AK">Alaska</option>
                    <option value="AZ">Arizona</option>
                    <option value="AR">Arkansas</option>
                    <option value="CA">California</option>
                    <option value="CO">Colorado</option>
                    <option value="CT">Connecticut</option>
                    <option value="DE">Delaware</option>
                    <option value="FL">Florida</option>
                    <option value="GA">Georgia</option>
                    <option value="HI">Hawaii</option>
                    <option value="ID">Idaho</option>
                    <option value="IL">Illinois</option>
                    <option value="IN">Indiana</option>
                    <option value="IA">Iowa</option>
                    <option value="KS">Kansas</option>
                    <option value="KY">Kentucky</option>
                    <option value="LA">Louisiana</option>
                    <option value="ME">Maine</option>
                    <option value="MD">Maryland</option>
                    <option value="MA">Massachusetts</option>
                    <option value="MI">Michigan</option>
                    <option value="MN">Minnesota</option>
                    <option value="MS">Mississippi</option>
                    <option value="MO">Missouri</option>
                    <option value="MT">Montana</option>
                    <option value="NE">Nebraska</option>
                    <option value="NV">Nevada</option>
                    <option value="NH">New Hampshire</option>
                    <option value="NJ">New Jersey</option>
                    <option value="NM">New Mexico</option>
                    <option value="NY">New York</option>
                    <option value="NC">North Carolina</option>
                    <option value="ND">North Dakota</option>
                    <option value="OH">Ohio</option>
                    <option value="OK">Oklahoma</option>
                    <option value="OR">Oregon</option>
                    <option value="PA">Pennsylvania</option>
                    <option value="RI">Rhode Island</option>
                    <option value="SC">South Carolina</option>
                    <option value="SD">South Dakota</option>
                    <option value="TN">Tennessee</option>
                    <option value="TX">Texas</option>
                    <option value="UT">Utah</option>
                    <option value="VT">Vermont</option>
                    <option value="VA">Virginia</option>
                    <option value="WA">Washington</option>
                    <option value="WV">West Virginia</option>
                    <option value="WI">Wisconsin</option>
                    <option value="WY">Wyoming</option>
                  </select>
                  <span class="help-inline col-xs-12 col-sm-7">
                    <span class="middle"></span>
                  </span>
                </div>
              </div>



              <div class="col-md-offset-2 col-md-9">
                <a class="btn btn-info submit">
                  <i class="icon-ok bigger-110"></i>
                  提交
                </a>
                <button class="btn" type="reset">
                  <i class="icon-undo bigger-110"></i>
                  重置
                </button>
              </div>
            </form>
            <!-- PAGE CONTENT ENDS -->
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.page-content -->
    </div><!-- /.main-content -->
  </div><!-- /.main-container-inner -->

  <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
    <i class="icon-double-angle-up icon-only bigger-110"></i>
  </a>
</div>
<!-- /.main-container -->
{include file="public/footerjs"/}
<script src="__ADMIN__/ace/js/chosen.jquery.min.js"></script>

<script>
  $(function () {
    var $fmWork = $('#fmWork');

    $(".chosen-select").chosen();

    $fmWork.find('a.submit').click(function () {
      var param = ittaoli.serializeObject($fmWork);
      if (param.pwd != param.repwd) {
        bootbox.alert('两次密码不一致~');
        return;
      }
      param.id=param.id==''?0:param.id;
      console.log(param);
      $.post("{:Url('doAdd')}", {param: JSON.stringify(param)}, function (data) {
        if (data > 0) {
          bootbox.alert("保存成功！");
          setTimeout(function(){
            location.href="{:url('index')}";
          },1000);
        } else {
          bootbox.alert("保存失败！");
        }
      });
    });


  });
</script>


{include file="public/foot"/}
